package com.example.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.pojo.Waste;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.vo.WasteVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lyj
 * @since 2023-02-16
 */
public interface WasteMapper extends BaseMapper<Waste> {

    @Select("select wt.name wasteTypeName,w.*\n" +
            "from waste_type wt, waste w ${ew.customSqlSegment}")
    Page<WasteVo> queryByCondition(Page<WasteVo> page, @Param("ew") QueryWrapper<WasteVo> wrapper);
}
